Skip to content

1570 1#5329

Merged
ivicac merged 9 commits into
masterfrom
1570_1
Jul 3, 2026
Merged

1570 1#5329
ivicac merged 9 commits into
masterfrom
1570_1

Conversation

@ivicac

@ivicac ivicac commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request expands the Copilot/AI chat UI to support interactive tool-result rendering and introduces an LLM model picker with per-workspace persistence, backed by new GraphQL queries for provider catalogs and defaults.

Changes:

  • Add interactive AI chat “data parts” (connection creation/selection, property option selection, ask-user-question wizard, run-error surface) plus supporting stores/utilities.
  • Introduce an LLM provider+model picker (with per-workspace “last used” persistence) and wire it into the Copilot panel/runtime state.
  • Extend GraphQL/codegen inputs to include the AI gateway schema and generate client hooks for aiDefaultModel and aiProviderCatalog.

Reviewed changes

Copilot reviewed 33 out of 33 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
client/src/shared/middleware/graphql.ts Adds generated types/hooks for AI default model + provider catalog queries.
client/src/shared/components/copilot/utils/extractScriptFromDefinition.ts Utility to locate a script parameter for a named node inside a JSON workflow definition.
client/src/shared/components/copilot/utils/extractScriptFromDefinition.test.ts Unit tests for script extraction utility.
client/src/shared/components/copilot/stores/useCopilotToolResultHandlerRegistry.ts New registry store for mapping tool results to client-side handlers.
client/src/shared/components/copilot/stores/useCopilotStore.ts Stores per-conversation selected LLM provider/model and persists it through save/restore.
client/src/shared/components/copilot/stores/useCopilotCodeToolResultStore.ts Stores the last updated workflow definition emitted by a code tool result.
client/src/shared/components/copilot/runtime-providers/CopilotRuntimeProvider.tsx Injects environment/workspace/LLM selection into agent state; handles tool result and run-error events.
client/src/shared/components/copilot/CopilotPanel.tsx Adds model picker, default-model query, dataComponents wiring, and preset suggestions.
client/src/shared/components/ai/model-picker/ModelPicker.tsx New dropdown UI for selecting provider/model (plus “model by id” input).
client/src/shared/components/ai/model-picker/ModelPicker.test.tsx Component tests for the model picker behavior.
client/src/shared/components/ai/model-picker/lastUsedModel.ts LocalStorage persistence helpers for per-workspace last used model/provider.
client/src/shared/components/ai/model-picker/lastUsedModel.test.ts Unit tests for last-used model persistence helpers.
client/src/shared/components/ai-chat/stores/useAiChatToolCallStore.ts New store tracking tool-call lifecycle, progress, and cross-task cleanup.
client/src/shared/components/ai-chat/stores/useAiChatRetryableErrorStore.ts New store for retryable error details.
client/src/shared/components/ai-chat/stores/useAiChatAskedQuestionsStore.ts New in-memory store for answered ask-user-question flows keyed by fingerprint.
client/src/shared/components/ai-chat/stores/tests/useAiChatToolCallStore.test.ts Tests for tool-call lifecycle and reset-for-task behavior.
client/src/shared/components/ai-chat/stores/tests/useAiChatRetryableErrorStore.test.ts Tests for retryable error store behavior.
client/src/shared/components/ai-chat/messages/toToolResultDataPart.ts Shared tool-result payload parsing/validation → assistant-ui data-part mapping.
client/src/shared/components/ai-chat/messages/tests/toToolResultDataPart.test.ts Tests for tool-result data-part mapping and validation failures.
client/src/shared/components/ai-chat/messages/tests/SelectPropertyOptionMessage.test.tsx Tests for property option selection UI behavior.
client/src/shared/components/ai-chat/messages/tests/CreateConnectionMessage.test.tsx Tests for create-connection message UI behavior.
client/src/shared/components/ai-chat/messages/tests/AskUserQuestionMessage.test.tsx Tests for ask-user-question wizard behavior (single/multi/wizard/other/threshold).
client/src/shared/components/ai-chat/messages/SelectPropertyOptionMessage.tsx Renders select-property-option tool results as a ComboBox and submits selected value.
client/src/shared/components/ai-chat/messages/SelectConnectionMessage.tsx Renders select-connection tool results as a dropdown of existing connections.
client/src/shared/components/ai-chat/messages/RunErrorMessage.tsx New red callout UI for RUN_ERROR events.
client/src/shared/components/ai-chat/messages/humanizeAgentErrorMessage.ts Utility to strip provider/Java envelopes into a user-readable run error.
client/src/shared/components/ai-chat/messages/CreateConnectionMessage.tsx Renders create-connection tool results as a “Connect ” dialog button flow.
client/src/shared/components/ai-chat/messages/AskUserQuestionMessage.tsx Wizard UI for ask-user-question tool results with persistence via fingerprint store.
client/src/shared/components/ai-chat/messages/aiChatDataComponents.tsx Registers data-part component mapping for assistant-ui thread rendering.
client/src/pages/platform/workflow-editor/components/properties/components/property-code-editor/property-code-editor-dialog/hooks/usePropertyCodeEditorDialog.ts Applies updateScriptComponentCode tool result back into the code editor after a Copilot turn.
client/src/graphql/platform/ai-providers/aiProviderCatalog.graphql Adds aiProviderCatalog query document.
client/src/graphql/platform/ai-providers/aiDefaultModel.graphql Adds aiDefaultModel query document.
client/codegen.ts Includes AI gateway GraphQL schema in codegen sources.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread client/src/shared/components/ai-chat/messages/SelectPropertyOptionMessage.tsx Outdated
Comment thread client/src/shared/components/ai-chat/messages/SelectConnectionMessage.tsx Outdated
Comment thread client/src/shared/components/ai/model-picker/ModelPicker.tsx
Comment thread client/src/shared/components/ai/model-picker/ModelPicker.tsx Outdated
Comment thread client/src/shared/components/copilot/runtime-providers/CopilotRuntimeProvider.tsx Outdated
…ot runtime

- SelectPropertyOptionMessage: fix missing space in opacity className, disable
  the picker when superseded, and resolve the picked option by its unique value
  instead of an ambiguous label match (label still drives search).
- SelectConnectionMessage: fix missing space in opacity className.
- ModelPicker: fall back to BrainCircuitIcon when a provider has no icon, and
  gate the 'Choose model by ID' affordance behind provider.supportsModelById.
- CopilotRuntimeProvider: stop pre-adding an empty assistant message so a
  tool-result/run-error-only turn no longer leaves a blank bubble.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sonarqubecloud

sonarqubecloud Bot commented Jul 3, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed for 'client'

Failed conditions
59.4% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@ivicac ivicac merged commit 2de4cec into master Jul 3, 2026
8 of 9 checks passed
@ivicac ivicac deleted the 1570_1 branch July 3, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants